package com.crr.mongodb.bean;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Document
@Accessors(chain = true)
public class Person {
    @Id
    private Integer no;
    private String name;
    private Integer age;
    private String address;
    private List<Pet> pets;
    //@Indexed(expireAfterSeconds = 10)
    private LocalDateTime createTime;

}
